
---@class RedDotsStoryHandler
RedDotsStoryHandler ={};
local this = RedDotsStoryHandler;

function RedDotsStoryHandler.init()
    CloseEvent(Config.EventType.StoryRead,this.update)
    ListenEvent(Config.EventType.StoryRead,this.update)
    return this;
end

-- 参数1： 任务类型。
function RedDotsStoryHandler.getFlag(...)
    --[[if not logicMgr.FuncOpenManager.isOpen(Config.FuncOpenType.Story,false) then
        return Config.RedDotsFlagState.None
    end
    local cfgs = dataTable.getDataTable("t_storymain")
    for k,v in pairs(cfgs) do
        if v.f_mapid > 0 and logicMgr.MapManager.getMapId() >= v.f_mapid and GetPlayerPrefs("StoryRead"..v.f_StoryID) ~= "1" then
            return Config.RedDotsFlagState.Needful
        end
    end--]]
    return Config.RedDotsFlagState.None
end


function RedDotsStoryHandler.update()
    RedDotsManager.addBroadcast(Config.RedDotsType.Story);
end